package com.jy.datapipeline.export.splitkey.adapter;

import com.jy.datapipeline.export.splitkey.split.Split;
import com.jy.datapipeline.export.splitkey.handler.SplitKeyTaskHandler;
import lombok.SneakyThrows;

/**
 * @类名 SplitKeyAdapter
 * @描述 使用适配器将指定对象转换为目标接口进行分片操作
 * @作者 白条君
 * @创建日期 2023/8/27 00:42
 * @版本 1.0
 */
public class SplitKeyAdapter implements SplitKeyExecutor {

    private final Split split;

    public SplitKeyAdapter(Split split) {
        this.split = split;
    }

    @Override
    @SneakyThrows
    public void execute(SplitKeyTaskHandler taskExecuteHandler) {
        split.execute(taskExecuteHandler);
    }
}
